CC=gcc
MAKE=make
CFLAGS=$(DEBUG) 
INCLUDES=$(shell pg_config --includedir)
LIBDIRS=$(shell pg_config --libdir)

pgtest01:
	$(CC) $(DEBUG) $(CFLAGS) pgtest01.c -I$(INCLUDES) -L$(LIBDIRS) -lpthread -lpq -o pgtest01

debug:
	$(MAKE) $(MAKEFILE) DEBUG="-g -DDEBUG"
clean: 
	if [ -f pgtest01 ] ; then rm pgtest01; fi